local shenqiang = fk.CreateSkill {
  name = "th_shenqiang",
}

shenqiang:addEffect("viewas", {
  anim_type = "offensive",
  prompt = "#th_shenqiang",
  pattern = "slash",
  mute_card = false,
  handly_pile = true,
  filter_pattern = {
    min_num = 1,
    max_num = 1,
    pattern = ".|.|heart"
  },
  view_as = function(self, player,cards)
    if #cards ~= 1 then
      return nil
    end
    local c = Fk:cloneCard("slash")
    c.skillName = shenqiang.name
    c:addSubcard(cards[1])
    return c
  end,
  enabled_at_response = function(self, player, response) return not response end,
})

shenqiang:addEffect(fk.Damage, {
  is_delay_effect = true,
  anim_type = "support",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(shenqiang.name) and data.card and data.card.trueName == "slash" and table.contains(data.card.skillNames, shenqiang.name) and player:isWounded()
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    player.room:recover{
      who = player,
      num = 1,
      recoverBy = player,
      skillName = shenqiang.name,
    }
  end,
})

shenqiang:addEffect("targetmod", {
  bypass_distances = function(self, player, skill, card)
    return card and table.contains(card.skillNames, shenqiang.name)
  end,
  bypass_times = function(self, player, skill, scope, card, to)
    return card and table.contains(card.skillNames, shenqiang.name)
  end,
})

Fk:loadTranslationTable{
  ["th_shenqiang"] = "神枪",
  [":th_shenqiang"] = "你可以将<font color='red'>♥</font>牌当无距离和次数限制的【杀】使用，此【杀】造成伤害后，你回复1点体力。",

  ["#th_shenqiang"] = "神枪：将<font color='red'>♥</font>牌当无距离和次数限制的【杀】使用，此【杀】造成伤害后，你回复1点体力",
}

return shenqiang